﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Domain.Entitys.Sinv
{
    public class Sinv_Sale_Order_Info
    {
        public int Sale_order_id { get; set; }//销售订单id
        public string Sale_order_name { get; set; }//销售订单名称
        public string Sale_order_code { get; set; }//销售订单编号
        public string Customer_name { get; set; }//客户名称
        public string Customer_code { get; set; }//客户编号
        public DateTime Sale_order_sign_time { get; set; }//订单签单日期
        public DateTime Sale_order_deliver_time { get; set; }//订单交付日期
        public decimal Sale_order_total_qty { get; set; }//销售总数量
        public decimal Sale_order_total_price { get; set; }//销售总金额
        public decimal Sale_order_total_proce { get; set; }//销售成本总额
        public int Sale_order_status { get; set; }//出库状态
        public char Sale_order_audit_status { get; set; }//审核状态
        public string Contacts_name { get; set; }//客户联系人名称
        public string Contacts_phone { get; set; }//客户联系人电话
        public int Sale_order_rep_id { get; set; }//销售订单负责人
        public int Sale_order_dept_id { get; set; }//销售订单负责人部门
        public string? Create_by { get; set; }//创建人
        public DateTime? Create_time { get; set; }//创建时间

        public ICollection<Sinv_Sale_Order_Details> Details { get; set; }

        public class Sinv_Sale_Order_Details
        {
            public int Sale_order_details_id { get; set; }//订单明细id
            public string Sale_order_code { get; set; }//销售订单编号
            public string Pro_name { get; set; }//产品名称
            public string Pro_code { get; set; }//产品编码
            public string Pro_brand { get; set; }//产品品牌
            public string Pro_model { get; set; }//规格型号
            public int Measure_id { get; set; }//计量单位id
            public decimal Pro_sale_qty { get; set; }//销售数量
            public decimal Pro_sale_price { get; set; }//销售单价
            public decimal Pro_total_amount { get; set; }//产品总金额
            public decimal Pro_cost_price { get; set; }//成本单价
            public decimal Pro_total_cost { get; set; }//成本合计
            public decimal Pro_return_qty { get; set; }//退货数量
            public decimal Pro_outbound_qty { get; set; }//出库数量
            public decimal Pro_planned_return_qty { get; set; }//预计退货数量
            public decimal Pro_planned_outbound_qty { get; set; }//预计出库数量


        }
    }
}
